import { AnimationClip } from "cc";
import State from "../../common/State";
import { StateMachine } from "../../common/StateMachine";
import { DirectionSubStateMachine } from "../../common/DirectionSubStateMachine";
import { DIRECTION_ENUM } from "../../Enum";

const baseUrl = 'texture/player/blockback'

export class BlockBackStateMachine extends DirectionSubStateMachine {

  constructor(fsm: StateMachine) {
    super(fsm)
    this.stateMachine[DIRECTION_ENUM.TOP] = new State(this.fsm, `${baseUrl}/top`, AnimationClip.WrapMode.Normal)
    this.stateMachine[DIRECTION_ENUM.BOTTOM] = new State(this.fsm, `${baseUrl}/bottom`, AnimationClip.WrapMode.Normal)
    this.stateMachine[DIRECTION_ENUM.LEFT] = new State(this.fsm, `${baseUrl}/left`, AnimationClip.WrapMode.Normal)
    this.stateMachine[DIRECTION_ENUM.RIGHT] = new State(this.fsm, `${baseUrl}/right`, AnimationClip.WrapMode.Normal)
  }

}

